<p-dialog [(visible)]="display" modal="modal"  [responsive]="true" [width]="width"(onHide)="closeMask(false)" class="zktz">
    <p-header>
        {{title}}
    </p-header>
    <form class="form-horizontal zktz-equipment-add-or-update-device ui-fluid" #form="ngForm" novalidate (submit)="form.valid&&formSubmit(false)">
        <div class="form-group">
            <label for="inputUserName" class="col-sm-2 control-label"><span>*</span>设备编码</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="inputUserName" required minlength="9" name="inputUserName"
                       [(ngModel)]="currentAsset.ano"
                       #username="ngModel" placeholder="设备编码" disabled>
            </div>
            <div class="col-sm-4"  *ngIf="state=='add'">
                <input type="text" class="form-control" id="inputUserName" required minlength="9" name="inputUserName"
                       [(ngModel)]="submitAddAsset.ano"
                       pattern="\d{12}"
                       #username="ngModel" placeholder="设备编码">
                <p-message *ngIf="username.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="username.errors?.required&&(!username.untouched)" severity="error"
                               text="设备编码为必填项"></p-message>
                    <p-message *ngIf="username.errors?.pattern && username.dirty" severity="error"
                               text="设备编码为12位数字"></p-message>
                    <p-message *ngIf="username.errors?.required && username.untouched&&form.submitted" severity="error"
                               text="设备编码为必填项"></p-message>
                </div>
            </div>
            <label for="father" class="col-sm-2 control-label">从属于</label>
            <div class="col-sm-4">
                <input type="text" class="form-control" id="father"
                       name="father"
                       [(ngModel)]="currentAsset.father"
                       #father="ngModel" placeholder="从属于" *ngIf="state =='update'">
                <input type="text" class="form-control" id="father"
                       name="father"
                       [(ngModel)]="submitAddAsset.father"
                       #father="ngModel" placeholder="从属于" *ngIf="state =='add'">
            </div>
        </div>
        <div class="form-group">
            <label for="card_position" class="col-sm-2 control-label">所在槽位</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="card_position"  name="card_position"
                       [(ngModel)]="currentAsset.card_position"
                       placeholder="所在槽位" *ngIf="state=='update'">
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="card_position" name="card_position"
                       [(ngModel)]="submitAddAsset.card_position"
                       placeholder="所在槽位" *ngIf="state=='add'">
            </div>
            <label for="asset_no" class="col-sm-2 control-label">固定资产编码</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="asset_no"
                       name="asset_no"
                       [(ngModel)]="currentAsset.asset_no"
                       #asset_no="ngModel" placeholder="固定资产编码" *ngIf="state=='update'">
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="asset_no"
                       name="asset_no"
                       [(ngModel)]="submitAddAsset.asset_no"
                       #asset_no="ngModel" placeholder="固定资产编码" *ngIf="state=='add'">
            </div>
        </div>
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">设备名称</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="name" name="name"
                       [(ngModel)]="currentAsset.name"
                       placeholder="设备名称" *ngIf="state=='update'">
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="name"  name="name"
                       [(ngModel)]="submitAddAsset.name"
                       placeholder="设备名称" >
            </div>
            <label for="en_name" class="col-sm-2 control-label">英文命名</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="en_name"
                       name="en_name"
                       [(ngModel)]="currentAsset.en_name"
                       placeholder="英文命名" *ngIf="state=='update'">

            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="en_name"
                       name="en_name"
                       [(ngModel)]="submitAddAsset.en_name"
                       placeholder="英文命名" >
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">设备品牌</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.brand" [suggestions]="brandoptions" (completeMethod)="searchSuggest($event,'brand')"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="brand">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.brand" [suggestions]="brandoptions" (completeMethod)="searchSuggest($event,'brand')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="brand">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label  class="col-sm-2 control-label">设备型号</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.modle" [suggestions]="modleoptions" (completeMethod)="searchSuggest($event,'modle')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="modle">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.modle" [suggestions]="modleoptions" (completeMethod)="searchSuggest($event,'modle')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="modle">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">设备主要功能</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.function" [suggestions]="functionoptions" (completeMethod)="searchSuggest($event,'function')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="function">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.function" [suggestions]="functionoptions" (completeMethod)="searchSuggest($event,'function')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="function">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label class="col-sm-2 control-label">设备所属系统</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.system" [suggestions]="systemoptions" (completeMethod)="searchSuggest($event,'system')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="system">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.system" [suggestions]="systemoptions" (completeMethod)="searchSuggest($event,'system')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="system">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">设备状态</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.status" [suggestions]="statusoptions" (completeMethod)="searchSuggest($event,'status')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="status">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.status" [suggestions]="statusoptions" (completeMethod)="searchSuggest($event,'status')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'"  name="status">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label  class="col-sm-2 control-label">设备上线日期</label>
            <div class="col-sm-4">
                <p-calendar name="online" [(ngModel)]="currentAsset .on_line_datetime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='update'"  [showIcon]="true"  [showIcon]="true" [locale]="zh"></p-calendar>
                <p-calendar name="online" [(ngModel)]="submitAddAsset .on_line_datetime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='add'"  [showIcon]="true"  [showIcon]="true" [locale]="zh"></p-calendar>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">设备尺寸</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.size" [suggestions]="sizeoptions" (completeMethod)="searchSuggest($event,'size')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="size">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.size" [suggestions]="sizeoptions" (completeMethod)="searchSuggest($event,'size')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="size">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label class="col-sm-2 control-label">设备所在机房</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.room" [suggestions]="roomoptions" (completeMethod)="searchSuggest($event,'room')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="room">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.room" [suggestions]="roomoptions" (completeMethod)="searchSuggest($event,'room')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="room">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">设备安装机架</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.cabinet" [suggestions]="cabinetoptions" (completeMethod)="searchSuggest($event,'cabinet')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="cabinet">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.cabinet" [suggestions]="cabinetoptions" (completeMethod)="searchSuggest($event,'cabinet')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="cabinet">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label  class="col-sm-2 control-label">设备安装位置</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.location" [suggestions]="locationoptions" (completeMethod)="searchSuggest($event,'location')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="location">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.location" [suggestions]="locationoptions" (completeMethod)="searchSuggest($event,'location')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="location">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">设备所属部门</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.belong_dapart" [suggestions]="belong_dapartoptions" (completeMethod)="searchSuggest($event,'belong_dapart')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="belong_depart">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.belong_dapart" [suggestions]="belong_dapartoptions" (completeMethod)="searchSuggest($event,'belong_dapart')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="belong_depart">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label  class="col-sm-2 control-label">设备所属部门管理人</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.belong_dapart_manager" [suggestions]="belong_dapart_manageroptions" (completeMethod)="searchSuggest($event,'belong_dapart_manager')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="belong_depart_manager">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.belong_dapart_manager" [suggestions]="belong_dapart_manageroptions" (completeMethod)="searchSuggest($event,'belong_dapart_manager')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="belong_depart_manager">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label for="belong_dapart_phone" class="col-sm-2 control-label">设备所属部门管理人手机号码</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control"
                       name="belong_dapart_phone"
                       [(ngModel)]="currentAsset.belong_dapart_phone"
                       placeholder="设备所属部门管理人手机号码">
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="belong_dapart_phone"
                       name="belong_dapart_phone"
                       [(ngModel)]="submitAddAsset.belong_dapart_phone"
                       placeholder="设备所属部门管理人手机号码" *ngIf="state ==='add'">
            </div>
            <label class="col-sm-2 control-label">管理部门</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.manage_dapart" [suggestions]="manage_dapartoptions" (completeMethod)="searchSuggest($event,'manage_dapart')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="manage_dapartoptions">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.manage_dapart" [suggestions]="manage_dapartoptions" (completeMethod)="searchSuggest($event,'manage_dapart')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="manage_dapartoptions">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">管理人</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.manager" [suggestions]="manageroptions" (completeMethod)="searchSuggest($event,'manager')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="manager">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.manager" [suggestions]="manageroptions" (completeMethod)="searchSuggest($event,'manager')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="manager">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label for="manager_phone" class="col-sm-2 control-label">管理人手机号码</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="manager_phone"
                       name="manager_phone"
                       [(ngModel)]="currentAsset.manager_phone"
                       placeholder="管理人手机号码" >

            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="manager_phone"
                       name="manager_phone"
                       [(ngModel)]="submitAddAsset.manager_phone"
                       #manager_phone="ngModel" placeholder="管理人手机号码" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">用电等级</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.power_level" [suggestions]="power_leveloptions" (completeMethod)="searchSuggest($event,'power_level')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="power_level">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.power_level" [suggestions]="power_leveloptions" (completeMethod)="searchSuggest($event,'power_level')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="power_level">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label  class="col-sm-2 control-label">供电类型</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.power_type" [suggestions]="power_typeoptions" (completeMethod)="searchSuggest($event,'power_type')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="power_type">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.power_type" [suggestions]="power_typeoptions" (completeMethod)="searchSuggest($event,'power_type')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="power_type">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label for="power_rate" class="col-sm-2 control-label">额定功率</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="power_rate"
                       name="power_rate"
                       [(ngModel)]="currentAsset.power_rate"
                       placeholder="额定功率" >
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="power_rate"
                       name="power_rate"
                       [(ngModel)]="submitAddAsset.power_rate"
                       placeholder="额定功率" >
            </div>
            <label class="col-sm-2 control-label"><span>*</span>电源插头类型</label>
            <div class="col-sm-4" *ngIf="state == 'update'">
                <p-autoComplete [(ngModel)]="currentAsset.plug_type" [suggestions]="plug_typeoptions" (completeMethod)="searchSuggest($event,'plug_type')" [size]="30"
                                [minLength]="1" [dropdown]="true"  required name="plug_type">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="plug_type"[(ngModel)]="currentAsset.plug_type" name="plug_type" required hidden #plug_type="ngModel">

                <p-message *ngIf="plug_type.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="plug_type.errors?.required && (plug_type.dirty)" severity="error" text="电源插头类型必须填写"></p-message>
                    <p-message *ngIf="plug_type.errors?.required && plug_type.untouched && form.submitted" severity="error"
                               text="电源插头类型必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state == 'add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.plug_type" [suggestions]="plug_typeoptions" (completeMethod)="searchSuggest($event,'plug_type')" [size]="30"
                                [minLength]="1" [dropdown]="true"  required  name="plug_type"  >
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="plug_type"[(ngModel)]="submitAddAsset.plug_type" name="plug_type" required hidden #plug_type="ngModel">
                <p-message *ngIf="plug_type.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="plug_type.errors?.required && (!plug_type.untouched)" severity="error" text="电源插头类型必须填写"></p-message>
                    <p-message *ngIf="plug_type.errors?.required && plug_type.untouched && form.submitted" severity="error"
                               text="电源插头类型必须填写"></p-message>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label for="power_count" class="col-sm-2 control-label"><span>*</span>电源数量</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="power_count" required
                       name="power_count"
                       [(ngModel)]="currentAsset.power_count"
                       #power_count="ngModel" placeholder="电源数量">
                <p-message *ngIf="power_count.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_count.errors?.required &&(power_count.dirty)" severity="error"
                               text="电源数量必须填写"></p-message>
                    <p-message *ngIf="power_count.errors?.required && power_count.untouched&&form.submitted" severity="error"
                               text="电源数量必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="power_count" required
                       name="power_count"
                       pattern=""
                       [(ngModel)]="submitAddAsset.power_count"
                       #power_count="ngModel" placeholder="电源数量">
                <p-message *ngIf="power_count.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_count.errors?.required &&(!power_count.untouched)" severity="error"
                               text="电源数量必须填写"></p-message>
                    <p-message *ngIf="power_count.errors?.required && power_count.untouched&&form.submitted" severity="error"
                               text="电源数量必须填写"></p-message>
                </div>
            </div>
            <label class="col-sm-2 control-label"><span>*</span>电源冗余模式</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_redundant_model" [suggestions]="power_redundant_modeloptions" (completeMethod)="searchSuggest($event,'power_redundant_model')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_redundant_model">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_redundant_model"[(ngModel)]="currentAsset.power_redundant_model" name="power_redundant_model" required hidden #power_redundant_model="ngModel">
                <p-message *ngIf="power_redundant_model.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_redundant_model.errors?.required && (power_redundant_model.dirty)" severity="error" text="电源冗余模式必须填写"></p-message>
                    <p-message *ngIf="power_redundant_model.errors?.required && power_redundant_model.untouched&&form.submittedl" severity="error" text="电源冗余模式必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_redundant_model" [suggestions]="power_redundant_modeloptions" (completeMethod)="searchSuggest($event,'power_redundant_model')" [size]="30"
                                [minLength]="1" [dropdown]="true" name="power_redundant_model">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_redundant_model"[(ngModel)]="submitAddAsset.power_redundant_model" name="power_redundant_model" required hidden #power_redundant_model="ngModel">
                <p-message *ngIf="power_redundant_model.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_redundant_model.errors?.required && (!power_redundant_model.untouched)" severity="error" text="电源冗余模式必须填写"></p-message>
                    <p-message *ngIf="power_redundant_model.errors?.required && power_redundant_model.untouched&&form.submitted" severity="error" text="电源冗余模式必须填写"></p-message>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label"><span>*</span>供电来源</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_source" [suggestions]="power_sourceoptions" (completeMethod)="searchSuggest($event,'power_source')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_source">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_source"[(ngModel)]="currentAsset.power_source" name="power_source" required hidden #power_source="ngModel">
                <p-message *ngIf="power_source.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_source.errors?.required && (power_source.dirty)" severity="error" text="供电来源必须填写"></p-message>
                    <p-message *ngIf="power_source.errors?.required && power_source.untouched&&form.submitted" severity="error" text="供电来源必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_source" [suggestions]="power_sourceoptions" (completeMethod)="searchSuggest($event,'power_source')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_source">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_source"[(ngModel)]="submitAddAsset.power_source" name="power_source" required hidden #power_source="ngModel">
                <p-message *ngIf="power_source.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_source.errors?.required && (!power_source.untouched)" severity="error" text="供电来源必须填写"></p-message>
                    <p-message *ngIf="power_source.errors?.required &&power_source.untouched && form.submitted" severity="error"
                               text="供电来源必须填写"></p-message>
                </div>
            </div>
            <label  class="col-sm-2 control-label"><span>*</span>电源插孔位置1</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_jack_position1" [suggestions]="power_jack_position1options" (completeMethod)="searchSuggest($event,'power_jack_position1')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position1">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position1"[(ngModel)]="currentAsset.power_jack_position1" name="power_jack_position1" required hidden #power_jack_position1="ngModel">
                <p-message *ngIf="power_jack_position1.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position1.errors?.required && (power_jack_position1.dirty)" severity="error" text="电源插孔位置1必须填写"></p-message>
                    <p-message *ngIf="power_jack_position1.errors?.required && power_jack_position1.untouched &&form.submitted" severity="error"
                               text="电源插孔位置1必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_jack_position1" [suggestions]="power_jack_position1options" (completeMethod)="searchSuggest($event,'power_jack_position1')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position1">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position1"[(ngModel)]="submitAddAsset.power_jack_position1" name="power_jack_position1" required hidden #power_jack_position1="ngModel">
                <p-message *ngIf="power_jack_position1.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position1.errors?.required && (!power_jack_position1.untouched)" severity="error" text="电源插孔位置1必须填写"></p-message>
                    <p-message *ngIf="power_jack_position1.errors?.required && power_jack_position1.untouched &&form.submitted" severity="error"
                               text="电源插孔位置1必须填写"></p-message>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label"><span>*</span>电源插孔位置2</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_jack_position2" [suggestions]="power_jack_position2options" (completeMethod)="searchSuggest($event,'power_jack_position2')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position2">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position2"[(ngModel)]="currentAsset.power_jack_position2" name="power_jack_position2" required hidden #power_jack_position2="ngModel">
                <p-message *ngIf="power_jack_position2.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position2.errors?.required && (power_jack_position2.dirty)" severity="error" text="电源插孔位置2必须填写"></p-message>
                    <p-message *ngIf="power_jack_position2.errors?.required && power_jack_position2.untouched &&form.submitted" severity="error"
                               text="电源插孔位置2必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_jack_position2" [suggestions]="power_jack_position2options" (completeMethod)="searchSuggest($event,'power_jack_position2')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position2">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position2"[(ngModel)]="submitAddAsset.power_jack_position2" name="power_jack_position2" required hidden #power_jack_position2="ngModel">
                <p-message *ngIf="power_jack_position2.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position2.errors?.required && (!power_jack_position2.untouched)" severity="error" text="电源插孔位置2必须填写"></p-message>
                    <p-message *ngIf="power_jack_position2.errors?.required && power_jack_position2.untouched &&form.submitted" severity="error"
                               text="电源插孔位置2必须填写"></p-message>
                </div>
            </div>
            <label class="col-sm-2 control-label"><span>*</span>电源插孔位置3</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_jack_position3" [suggestions]="power_jack_position3options" (completeMethod)="searchSuggest($event,'power_jack_position3')" [size]="30"
                                [minLength]="1" [dropdown]="true" name="power_jack_position3">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position3"[(ngModel)]="currentAsset.power_jack_position3" name="power_jack_position3" required hidden #power_jack_position3="ngModel">
                <p-message *ngIf="power_jack_position3.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position3.errors?.required && (power_jack_position3.dirty)" severity="error" text="电源插孔位置3必须填写"></p-message>
                    <p-message *ngIf="power_jack_position3.errors?.required && power_jack_position3.untouched &&form.submitted" severity="error"
                               text="电源插孔位置3必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_jack_position3" [suggestions]="power_jack_position3options" (completeMethod)="searchSuggest($event,'power_jack_position3')" [size]="30"
                                [minLength]="1" [dropdown]="true" name="power_jack_position3">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position3"[(ngModel)]="submitAddAsset.power_jack_position3" name="power_jack_position3" required hidden #power_jack_position3="ngModel">
                <p-message *ngIf="power_jack_position3.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position3.errors?.required && (!power_jack_position3.untouched)" severity="error" text="电源插孔位置3必须填写"></p-message>
                    <p-message *ngIf="power_jack_position3.errors?.required && power_jack_position3.untouched &&form.submitted" severity="error"
                               text="电源插孔位置3必须填写"></p-message>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label"><span>*</span>电源插孔位置4</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <p-autoComplete [(ngModel)]="currentAsset.power_jack_position4" [suggestions]="power_jack_position4options" (completeMethod)="searchSuggest($event,'power_jack_position4')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position4">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position4"[(ngModel)]="currentAsset.power_jack_position4" name="power_jack_position4" required hidden #power_jack_position4="ngModel">
                <p-message *ngIf="power_jack_position4.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position4.errors?.required && (power_jack_position4.dirty)" severity="error" text="电源插孔位置4必须填写"></p-message>
                    <p-message *ngIf="power_jack_position4.errors?.required && power_jack_position4.untouched &&form.submitted" severity="error"
                               text="电源插孔位置4必须填写"></p-message>
                </div>
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <p-autoComplete [(ngModel)]="submitAddAsset.power_jack_position4" [suggestions]="power_jack_position4options" (completeMethod)="searchSuggest($event,'power_jack_position4')" [size]="30"
                                [minLength]="1" [dropdown]="true"  name="power_jack_position4">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <input  id="power_jack_position4"[(ngModel)]="submitAddAsset.power_jack_position4" name="power_jack_position4" required hidden #power_jack_position4="ngModel">
                <p-message *ngIf="power_jack_position4.valid" severity="success"></p-message>
                <div class="message-box">
                    <p-message *ngIf="power_jack_position4.errors?.required && (!power_jack_position4.untouched)" severity="error" text="电源插孔位置4必须填写"></p-message>
                    <p-message *ngIf="power_jack_position4.errors?.required && power_jack_position4.untouched &&form.submitted" severity="error"
                               text="电源插孔位置4必须填写"></p-message>
                </div>
            </div>
            <label for="ip" class="col-sm-2 control-label">设备管理IP</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="ip"
                       name="ip"
                       [(ngModel)]="currentAsset.ip"
                       placeholder="设备管理IP">
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="ip"
                       name="ip"
                       [(ngModel)]="submitAddAsset.ip"
                       placeholder="设备管理IP">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">操作系统</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.operating_system" [suggestions]="operating_systemoptions" (completeMethod)="searchSuggest($event,'operating_system')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="operating_system">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.operating_system" [suggestions]="operating_systemoptions" (completeMethod)="searchSuggest($event,'operating_system')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="operating_system">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label for="up_connect" class="col-sm-2 control-label">设备上联设备</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="up_connect"
                       name="up_connect"
                       [(ngModel)]="currentAsset.up_connect"
                       placeholder="设备上联设备" >
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="up_connect"
                       name="up_connect"
                       [(ngModel)]="submitAddAsset.up_connect"
                       placeholder="设备上联设备" >
            </div>
        </div>
        <div class="form-group">
            <label for="down_connects" class="col-sm-2 control-label">设备下联设备</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control"
                       name="down_connects"
                       [(ngModel)]="currentAsset.down_connects"
                       placeholder="设备下联设备" >
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="down_connects"
                       name="down_connects"
                       [(ngModel)]="submitAddAsset.down_connects"
                       placeholder="设备下联设备" >
            </div>
            <label  class="col-sm-2 control-label">设备维保厂家</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.maintain_vender" [suggestions]="maintain_venderoptions" (completeMethod)="searchSuggest($event,'maintain_vender')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="maintain_vender">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.maintain_vender" [suggestions]="maintain_venderoptions" (completeMethod)="searchSuggest($event,'maintain_vender')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="maintain_vender">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
        </div>
        <div class="form-group">
            <label  class="col-sm-2 control-label">维保厂家联系人</label>
            <div class="col-sm-4">
                <p-autoComplete [(ngModel)]="currentAsset.maintain_vender_people" [suggestions]="maintain_vender_peopleoptions" (completeMethod)="searchSuggest($event,'maintain_vender_people')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='update'" name="maintain_vender_people">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
                <p-autoComplete [(ngModel)]="submitAddAsset.maintain_vender_people" [suggestions]="maintain_vender_peopleoptions" (completeMethod)="searchSuggest($event,'maintain_vender_people')" [size]="30"
                                [minLength]="1" [dropdown]="true" *ngIf="state ==='add'" name="maintain_vender_people">
                    <ng-template let-brand pTemplate="item">
                        <div class="ui-helper-clearfix" style="border-bottom:1px solid #D5D5D5">
                            <div style="font-size:18px;float:right;margin:10px 10px 0 0">{{brand}}</div>
                        </div>
                    </ng-template>
                </p-autoComplete>
            </div>
            <label for="maintain_vender_phone" class="col-sm-2 control-label">维保厂家联系电话</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <input type="text" class="form-control" id="maintain_vender_phone"
                       name="maintain_vender_phone"
                       [(ngModel)]="currentAsset.maintain_vender_phone"
                       placeholder="维保厂家联系电话" >
            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <input type="text" class="form-control" id="maintain_vender_phone"
                       name="maintain_vender_phone"
                       [(ngModel)]="submitAddAsset.maintain_vender_phone"
                       placeholder="维保厂家联系电话" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label">维保开始时间</label>
            <div class="col-sm-4">
                <p-calendar name="online" [(ngModel)]="currentAsset .maintain_starttime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='update'"  [showIcon]="true" [locale]="zh"></p-calendar>
                <p-calendar name="online" [(ngModel)]="submitAddAsset .maintain_starttime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='add'"  [showIcon]="true" [locale]="zh"></p-calendar>
            </div>
            <label  class="col-sm-2 control-label">维保结束时间</label>
            <div class="col-sm-4">
                <p-calendar name="online" [(ngModel)]="currentAsset .maintain_endtime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='update'"  [showIcon]="true" [locale]="zh"></p-calendar>
                <p-calendar name="online" [(ngModel)]="submitAddAsset .maintain_endtime" [showTime]="true"  dateFormat="yy-mm-dd" [showSeconds]="true" readonlyInput="true"  dataType="string" *ngIf="state ==='add'"  [showIcon]="true" [locale]="zh"></p-calendar>
            </div>
        </div>
        <div class="form-group">
            <label for="function_info" class="col-sm-2 control-label">用途说明</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <!--<input type="text" class="form-control" id="function_info" name="function_info"-->
                <!--[(ngModel)]="currentAsset.function_info"-->
                <!--placeholder="用途说明">-->
                <textarea pInputTextarea name="function_info" [(ngModel)]="currentAsset.function_info" placeholder="用途说明"></textarea>

            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <!--<input type="text" class="form-control" id="function_info"  name="function_info"-->
                <!--[(ngModel)]="submitAddAsset.function_info"-->
                <!--placeholder="用途说明">-->
                <textarea pInputTextarea name="function_info" [(ngModel)]="submitAddAsset.function_info" placeholder="用途说明"></textarea>

            </div>
            <label for="remarks" class="col-sm-2 control-label">备注</label>
            <div class="col-sm-4" *ngIf="state=='update'">
                <!--<input type="text" class="form-control" id="remarks"-->
                <!--name="remarks"-->
                <!--[(ngModel)]="currentAsset.remarks"-->
                <!--placeholder="备注">-->
                <textarea pInputTextarea name="remarks" [(ngModel)]="currentAsset.remarks" placeholder="备注"></textarea>

            </div>
            <div class="col-sm-4" *ngIf="state=='add'">
                <!--<input type="text" class="form-control" id="remarks"-->
                <!--name="remarks"-->
                <!--[(ngModel)]="submitAddAsset.remarks"-->
                <!--placeholder="备注">-->
                <textarea pInputTextarea name="remarks" [(ngModel)]="submitAddAsset.remarks" placeholder="备注"></textarea>
            </div>
        </div>
        <p-footer>
            <button type="submit" pButton label="确认" class="ui-button"></button>
            <button type="button" pButton label="取消" class="ui-button-cancel" (click)="closeAddOrUpdateMask(false)"></button>
        </p-footer>

    </form>
</p-dialog>
